package com.kawaiior.asoulworld.item.armor.asoulTeam;

import com.kawaiior.asoulworld.item.ModItems;
import com.kawaiior.asoulworld.item.armor.ItemArmorBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;

public class ItemArmorKira extends ItemArmorBase {
    public ItemArmorKira(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) {
        super(name, materialIn, renderIndexIn, equipmentSlotIn);
    }

    @Override
    public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
        if (!world.isRemote)
        {
            if (    player.getItemStackFromSlot(EntityEquipmentSlot.HEAD).getItem()== ModItems.KIRA_HELMET &&
                    player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem()==ModItems.KIRA_CHESTPLATE &&
                    player.getItemStackFromSlot(EntityEquipmentSlot.LEGS).getItem()==ModItems.KIRA_LEGGINGS &&
                    player.getItemStackFromSlot(EntityEquipmentSlot.FEET).getItem()==ModItems.KIRA_BOOTS )
            {
                player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE,1,0));
            }
        }
    }

}
